<template>
	<view class="ys">
		<view class="list">
			<view class="item">
				<view class="info">
					<view class="phone">
						<text>店铺名称</text> {{info.shop_name}}
					</view>
					<view class="phone">
						<text>店长姓名</text>{{info.name}}
					</view>
					<view class="phone">
						<text>联系方式</text>
						<view class="right" @click="call">
							<!-- {{info.shop_phone}} -->
							<uni-icons type="phone"></uni-icons>
						</view>
					</view>
					<view class="phone">
						<text>详细地址</text> {{info.shop_address}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		ContactShop
	} from "@/api/user.js"
	export default {
		data() {
			return {
				info: [],
				page: 1
			}
		},
		onLoad() {
			this.ContactShop()
		},
		methods: {
			call() {
				uni.makePhoneCall({
					phoneNumber: this.info.shop_phone
				})
			},
			ContactShop() {
				ContactShop().then(res => {
					if (res.status == 1) {
						this.info = res.data
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.list {
		padding: 10px;

		.item {
			display: flex;
			background: #fff;
			border-radius: 5px;
			padding: 10px 20px;
			box-sizing: border-box;
			align-items: center;
			margin-bottom: 10px;

			image {
				width: 50px;
				height: 50px;

			}

			.info {
				flex: 1;
				box-sizing: border-box;

				.phone {
					font-size: 14px;
					padding: 20px 0;
					display: flex;
					justify-content: space-between;

					text {
						font-weight: bold;
					}

					.right {
						text {
							margin-left: 5px;
						}
					}
				}
			}

			button {
				width: 70px;
				height: 35px;
				line-height: 35px;
				font-size: 13px;
				background: #E1ECFE;
				color: #6b7490;
				font-weight: bold;
			}
		}
	}
</style>